from cyaron import * # 引入CYaRon的库

_n = ati([0, 100, 500 , 1e3 , 1e3 , 1e4 , 1e4 , 1e5 , 1e5 , 1e5 , 1e5 , 5e5 , 5e5 , 1e6 , 1e6 , 1e6 , 1e6])
_m = ati([0, 200, 1000 , 2e3 , 2e3 , 2e4 , 2e4 , 2e5 , 2e5 , 2e5 , 2e5 , 1e6 , 1e6 , 2e6 , 2e6 , 2e6 , 2e6]) 


for i in range(1, 17): 
    test_data = IO(file_prefix="problem2_", data_id=i) 

    n = _n[i] # 点数
    m = _m[i] # 边数
    s = 1
    t = n
    test_data.input_writeln(n, m, s, t) 
    
    graph = Graph.UDAG(n, m, directed=True, weight_limit=(5, 400))
    test_data.input_writeln(graph) 
    
    graph = Graph.UDAG(n, m, directed=True, weight_limit=(500, 1000))
    test_data.input_writeln(graph) 